package nl.boelen.game.screen.menubutton;

import nl.boelen.game.Game;
import nl.boelen.game.enums.GameState;

public class NewButton extends MenuButton {
    private Game game;

    public NewButton(Game game, String text) {
        super(text);
        this.game = game;
    }

    @Override
    public void setVisibility(GameState gameState) {
        if (gameState == GameState.CREATING) {
            setVisible(true);
        } else {
            setVisible(false);
        }
    }

    @Override
    public void pressedButton() {
        game.play();
    }
}
